﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpenseSystem.Model;
using ExpenseSystem.Lor;
using ExpenseSystem.Common;
using ExpenseSystem.DataUpdater;
using ExpenseSystem.Fether;
using ExpenseSystem.Core.DataAddOn;
using System.Web;

namespace ExpenseSystem.Core.BonusModules
{
    public class DesignerBonusBaseManager: DesignerBonusManager
    {
        protected UserProfile userProfile = Authority.Authority.GetUserProfile();
        public override bool Delete(DesignerBonusModel DesignerBonus, out string message)
        {
            DesignerBonusFetcher fetcher = new DesignerBonusFetcher();
            return updater.Remove(DesignerBonus, tran, fetcher, out message);
        }

        public override bool DeleteById( long[] DesignerBonus, out string message)
        {
            DesignerBonusFetcher fetcher = new DesignerBonusFetcher();
            return updater.RemoveById(userProfile.SiteId, DesignerBonus, tran, fetcher, out message);
        }

        public override bool Save(DesignerBonusModel DesignerBonus,out string message, params IAddable<DesignerBonusModel>[] addables)
        {
            DesignerBonusFetcher fetcher = new DesignerBonusFetcher();
            return updater.Save(DesignerBonus, tran, fetcher, out message);
        }
    }
}
